home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-1097 / AMOSLIST / text0098.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  2.9 KB  |  90 lines

  1.  
  2. The man most directly responsible for this twaddle was Andy Gibson, who did
  3. thus comment on CD32 Pads on the night of 08-Oct-97:
  4.  
  5. -> Why  not  make  use  of the CD³² Joypad routine? I think MUSH may have
  6. -> this lying around, if not I do and it works 100%.
  7.  
  8. Yup, i have it, and here it is. You'll need LOWLEVEL.LIBRARY in your LIBS:
  9. drawer!!
  10.  
  11. '
  12. '    CD32 Joypad 
  13. '
  14. '    (c) K.Hill, Jan 1996
  15. '        
  16. '
  17. 'structures begin
  18. '
  19. 'Const JPF_BUTTON_FORWARD=$80000 
  20. 'Const JPF_LEFT  = 2 
  21. 'Const JPF_JOY_UP  = 8   
  22. 'Const JPF_BUTTON_REVERSE  =  $40000 
  23. 'Const JPF_DOWN  = 4   
  24. 'Const JPF_JOY_RIGHT  = 1    
  25. 'Const JPF_JOY_LEFT  = 2 
  26. 'Const JPF_BUTTON_GREEN  =  $100000  
  27. 'Const JPF_BUTTON_YELLOW  =  $200000 
  28. 'Const JPF_JOY_DOWN  = 4 
  29. 'Const JPF_BUTTON_BLUE  =  $800000 
  30. 'Const JPF_UP  = 8 
  31. 'Const JPF_BUTTON_PLAY  =  $20000  
  32. 'Const JPF_BTN1  =  $800000  
  33. 'Const JPF_BTN2  =  $400000  
  34. 'Const JPF_BTN3  =  $200000  
  35. 'Const JPF_BTN4  =  $100000  
  36. 'Const JPF_BTN5  =  $80000 
  37. 'Const JPF_RIGHT  = 1  
  38. 'Const JPF_BTN6  =  $40000 
  39. 'Const JPF_BTN7  =  $20000 
  40. 'Const JPF_BUTTON_RED  =  $400000  
  41. '
  42. 'Structures Constants
  43.  
  44. Global __JPF_BUTTON_FORWARD,__JPF_LEFT,__JPF_JOY_UP
  45. __JPF_BUTTON_FORWARD=524288 : __JPF_LEFT=2 : __JPF_JOY_UP=8
  46. Global __JPF_BUTTON_REVERSE,__JPF_DOWN,__JPF_JOY_RIGHT
  47. __JPF_BUTTON_REVERSE=262144 : __JPF_DOWN=4 : __JPF_JOY_RIGHT=1
  48. Global __JPF_JOY_LEFT,__JPF_BUTTON_GREEN,__JPF_BUTTON_YELLOW
  49. __JPF_JOY_LEFT=2 : __JPF_BUTTON_GREEN=1048576 : __JPF_BUTTON_YELLOW=2097152
  50. Global __JPF_JOY_DOWN,__JPF_BUTTON_BLUE,__JPF_UP
  51. __JPF_JOY_DOWN=4 : __JPF_BUTTON_BLUE=8388608 : __JPF_UP=8
  52. Global __JPF_BUTTON_PLAY,__JPF_BTN1,__JPF_BTN2
  53. __JPF_BUTTON_PLAY=131072 : __JPF_BTN1=8388608 : __JPF_BTN2=4194304
  54. Global __JPF_BTN3,__JPF_BTN4,__JPF_BTN5,__JPF_RIGHT
  55. __JPF_BTN3=2097152 : __JPF_BTN4=1048576 : __JPF_BTN5=524288 : __JPF_RIGHT=1
  56. Global __JPF_BTN6,__JPF_BTN7,__JPF_BUTTON_RED
  57. __JPF_BTN6=262144 : __JPF_BTN7=131072 : __JPF_BUTTON_RED=4194304
  58.  
  59. 'structures end
  60. Lib Open 1,"lowlevel.library",40
  61.  
  62. Dreg(0)=1
  63. While 1
  64.    Z=Lib Call(1,-30)
  65.    If Z and __JPF_BUTTON_BLUE Then Print "Blue"
  66.    If Z and __JPF_BUTTON_RED Then Print "Red"
  67.    If Z and __JPF_BUTTON_GREEN Then Print "Green"
  68.    If Z and __JPF_BUTTON_YELLOW Then Print "Yellow"
  69.    If Z and __JPF_BUTTON_PLAY Then Print "Play"
  70.    If Z and __JPF_BUTTON_FORWARD Then Print "FF"
  71.    If Z and __JPF_BUTTON_REVERSE Then Print "Rew"
  72.    If Z and __JPF_JOY_DOWN Then Print "Down"
  73.    If Z and __JPF_JOY_UP Then Print "Up"
  74.    If Z and __JPF_JOY_LEFT Then Print "Left"
  75.    If Z and __JPF_JOY_RIGHT Then Print "Right"
  76. Wend 
  77.  
  78.  
  79. Andrew "Mushroom" Kellett
  80. --
  81.  Email: Andy Kellett <mushypd@redrose.net>  Team *AMOS* + IAPA Team *AMIGA*
  82.   alt.religion.amos - AMOS now on usenet! AMOS Mailinglist also mirrored
  83.  
  84.      World's Largest AMOS Homepages - http://www.mushy-pd.demon.co.uk
  85.  
  86.          Massive FTP site with AMOS/C64 and Mods/Samples + more at
  87.                             mushy-pd.dyn.ml.org
  88.  
  89.  
  90.